 * treatment effect plot
 * partisan retrospection project
 * heersink, jenkins, olson, and peterson
 * 8/3/2020
 
 *cd "C:\Users\michael.p.olson\Dropbox\Partisan Retrospection - Political Behavior R&R\R&R\gasper_reeves_study"
 
 
 use "gr_corrected_stata.dta" , clear
 
 xtset countyfips
 
* xi: xtreg inc_twpct  (c.propertypercapl_6mo c.disdecs_all_6mo c.turndowns_6mo)##(c.swing c.copart) pres_vote_lag1 pres_vote_lag2 medincK i.year, fe cl(countyfips)
  xi: areg inc_twpct  (c.propertypercapl_6mo c.disdecs_all_6mo c.turndowns_6mo)##(c.swing c.copart) pres_vote_lag1 pres_vote_lag2 medincK i.year, a(countyfips) cl(countyfips)

 
  use "newdata_copart.dta" , clear

  predict se, stdp
  predict yhat
  
  save "newdata_copart_fits.dta", replace
  
    use "newdata_contra.dta" , clear

  predict se, stdp
  predict yhat
  
  save "newdata_contra_fits.dta", replace